package org.dromara.fms.domain.bo;

import org.dromara.fms.domain.FmsBill;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 财务单据业务对象 fms_bill
 *
 * @author wenrui Su
 * @date 2024-03-22
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = FmsBill.class, reverseConvertGenerate = false)
public class FmsBillBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 单据类型
     */
    @NotNull(message = "单据类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long typeId;

    /**
     * 账单名称
     */
    @NotBlank(message = "账单名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String name;

    /**
     * 记账项目
     */
    @NotNull(message = "记账项目不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long classificationItemId;

    /**
     * 来往单位
     */
    @NotNull(message = "来往单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long partnerId;

    /**
     * 单据编号
     */
    private Long sourceId;

    /**
     * 操作员
     */
    private Long operId;

    /**
     * 应收金额
     */
    @NotNull(message = "应收金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal costMoney;

    /**
     * 实收金额
     */
    @NotNull(message = "实收金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal money;

    /**
     * 账户
     */
    @NotNull(message = "账户不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long accountId;

    /**
     * 计划时间
     */
    @NotNull(message = "计划时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date planTime;

    /**
     * 执行时间
     */
    private Date executionTime;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
